package com.resourcestore.dao;

import java.util.List;

import com.resourcestore.dao.BaseDao;
import com.resourcestore.model.Course;
import com.resourcestore.model.Major;
import com.resourcestore.model.MajorGroup;
import com.resourcestore.utils.tag.Pagination;


public class CourseDao extends BaseDao {

	public List<Course> selectCourse(){
		List<Course> list=this.queryForList("selectCourse");
		return list;
	}
	
	public List<Course> selectCoursePage(Course course,Pagination pagination){
		List<Course> list = this.queryForPage("selectCoursePage", course,pagination);
		return list;
	}
	
	public List<Course> selectCourseByIsPublic(Course course){
		List<Course> list = this.queryForList("selectCourseByIsPublic", course);
		return list;
	}
	
	public int queryCourseNum(Course course) {
		return this.queryNum("selectCourseCount", course);
	}
	
	public Course selectCourseById(Course course){
		return (Course)this.queryForObject("selectCourseById", course);
	}
	
	public void insertCourse(Course course){
		this.insert("insertCourse", course);		
	}
	
	public void updateCourse(Course course){
		this.update("updateCourse", course);	
	}
	
	public void deleteCourse(Course course){
		this.delete("deleteCourse", course);
	}
	
	public void deleteMoreCourse(Course course){
		this.delete("deleteMoreCourse", course);
	}
}
